/*Cpr billhainh*/

#ifndef VS2DWORDERECORDER_H
#define VS2DWORDRECORDER_H

#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6) || defined(SYMBIAN_S60_3X)
#include "ui_VS2DwordRecorder_Small.h"
#else
#include "ui_VS2DwordRecorder.h"
#endif

#include <QtCore/qurl.h>
#include <QtGui/qmainwindow.h>
#include <qmediarecorder.h>
#include <QtCore/qdir.h>
#include <QtGui/qfiledialog.h>
#include <QtCore/QFile>
#include <QtCore/QTextStream>
#include <QWidget>
#include <qaudiocapturesource.h>
#include <QMediaPlayer>
#include <QMediaContent>
#include <QObject>
#include <QMediaObject>
#include <QMediaService>

QT_BEGIN_NAMESPACE

namespace Ui {
    class wordRecorder;
}

class QAudioCaptureSource;
QT_END_NAMESPACE

QT_USE_NAMESPACE

class wordRecorder : public QMainWindow
{
    Q_OBJECT

public:
    wordRecorder(QWidget *parent = 0);
    ~wordRecorder();

private slots:
    void toggleRecord();
    void updateState(QMediaRecorder::State);
    void updateProgress(qint64 pos);
    void displayErrorMessage();
    QUrl generateAudioFilePath();
    void on_nextWord_clicked ();
    void on_listenButton_clicked();
    void on_quickModeButton_clicked(bool checked);
    void on_continueButton_clicked();
    void saveSession();
    void restoreSession();

private:
    Ui::wordRecorder *wRecUi;
    QAudioCaptureSource* audiosource;
    QMediaRecorder* capture;
    QAudioEncoderSettings  audioSettings;
    QMediaPlayer *player;
    bool outputLocationSet;
    QFile wordFile;
    QString wordName;
    bool QuickModeOff;
    QString lastSes;
    QUrl wordPlace;
    QString wordPlaceS;
    double wordLeft;
};

#endif
//1314.TM//
